Why didn't people implement auto_ptr with a "delete[]" in std::auto_ptr in the first place??? Since delete[] can be used for single pointer as well, for example:
delete[] works well here, doesn't it?Code:char * tmpi = new char; delete[] tmpi;
Why didn't people implement auto_ptr with a "delete[]" in std::auto_ptr in the first place??? Since delete[] can be used for single pointer as well, for example:
delete[] works well here, doesn't it?Code:char * tmpi = new char; delete[] tmpi;